<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1 id = "gg">好好学习</h1>
    <p id = "gg">天天向上</p>
</body>
    <script src="js/jquery-3.7.1.js" type="text/javascript" charset="utf-8"></script>
    <script>
        //id名字一样默认选择第一个
        $(document).ready(function(){
            $("#gg").css('color','red').css('font-size','30px');
        })
        
    </script>
</html>